
Last chance! 50% off unlimited learning
Sale ends in
The projected normal distribution provides a flexible distribution for circular data, e.g., asymmetry and possible bimodality.
dpnorm(x, mu, sigma, log = FALSE)
rpnorm(n, mu, sigma, control.circular=list())
a vector. The x
and q
objects are coerced to class circular
.
number of observations.
the mean vector of the bivariate normal.
the 2x2 variance and covariance matrix of the bivariate normal.
logical. If TRUE
the log of the density is reported.
the attribute of the resulting object.
dpnorm
gives the density, rpnorm
generates random deviates.
S.R. Jammalamadaka and A. SenGupta (2001). Topics in Circular Statistics, Section 2.2.4, World Scientific Press, Singapore. K.V. Mardia (1972). Statistics of Directional Data. Academic Press. London and New York. F. Wang and A.E. Gelfand (2013). Directional data analysis under the general projected normal distribution. Stat Methodol. 10(1):113-127. doi:10.1016/j.stamet.2012.07.005.
# NOT RUN {
data1 <- rpnorm(100, mu=c(0,0), sigma=diag(2),
control.circular=list(units="degrees")) # Uniform on the circle
plot(data1)
ff <- function(x) dpnorm(x, mu=c(0,0), sigma=diag(2)) # Uniform on the circle
curve.circular(ff, join=TRUE,
main="Density of a Projected Normal Distribution \n mu=(0,0), sigma=diag(2)")
ff <- function(x) dpnorm(x, mu=c(1,1), sigma=diag(2)) # Unimodal
curve.circular(ff, join=TRUE, xlim=c(-1, 2.3),
main="Density of a Projected Normal Distribution \n mu=(1,1), sigma=diag(2)")
sigma <- matrix(c(1,0.9,0.9,1), nrow=2)
ff <- function(x) dpnorm(x, mu=c(0.5,0.5), sigma=sigma) # Bimodal
curve.circular(ff, join=TRUE, xlim=c(-1, 2.3),
main="Density of a Projected Normal Distribution \n mu=(0.5,0.5), rho=0.9")
# }
Run the code above in your browser using DataLab